import request from "@/router/axios";

export const getList = (current, size, params) => {
  return request({
    url: "/api/blade-measure/measure/gauge/list",
    method: "get",
    params: {
      ...params,
      current,
      size
    }
  });
};

export const getListALl = params => {
  return request({
    url: "/api/blade-measure/measure/gaugetype/listAll",
    method: "get",
    params: {
      ...params
    }
  });
};

export const saveScale = params => {
  return request({
    url: "/api/blade-measure/measure/gauge/save",
    method: "post",
    data: {
      ...params
    }
  });
};

export const updateScale = params => {
  return request({
    url: "/api/blade-measure/measure/gauge/update",
    method: "post",
    data: {
      ...params
    }
  });
};

export const removeScale = gaugeId => {
  return request({
    url: "/api/blade-measure/measure/gauge/remove",
    method: "post",
    params: {
      ids: gaugeId
    }
  });
};

export const getScale = params => {
  return request({
    url: "/api/blade-measure/measure/gauge/info",
    method: "get",
    params: {
      ...params
    }
  });
};
